import zope.interface



class IJob(zope.interface.Interface):
    def __getstate__(self):
        """ Return the state dictionary for pickling """
    
    def start(self):
        """ """
    
    def stop(self):
        """ """
    
    def isRunning(self):
        """ """
    
    def getStatus(self):
        """ """

class IScheduledJob(IJob):
    def getScheduledCall(self):
        """ Accessor for the scheduled call """
    
    def getError(self):
        """ Access the failure that caused the job to stop or None if there 
        wasn't one """

class IJobService(zope.interface.Interface):
    def add(self,job):
        """ Add a job to the service """
    
    def remove(self, job):
        """ Remove a job from the service """
    
    def startService(self):
        """" Start the service """
    
    def stopService(self):
        """ Stop the service """
    
    def getJobs(self):
        """ Get the jobs in the job service """
